import axios from '@/utils/axios'

export const login = data => {
  return axios.request({
    url: 'front/user/login',
    data,
    method: 'post'
  })
};

export const getCaptcha = data => {
  return axios.request({
    url: 'common/captcha',
    data: {
      mobile: data
    },
    method: 'post'
  })
};
export const register = data => {
  return axios.request({
    url: 'front/user/register',
    data,
    method: 'post'
  })
};

export const resetPsw = data => {
  return axios.request({
    url: 'front/user/retrieve',
    data,
    method: 'post'
  })
};

export const wechatLogin = data => {
  return axios.request({
    url: 'front/user/wxOauth',
    params: data,
    method: 'get'
  })
};
